USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0003_TIPO_CREDITO]    Script Date: 11/28/2011 12:12:39 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WASP_M0003_TIPO_CREDITO]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0003_TIPO_CREDITO]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0003_TIPO_CREDITO]    Script Date: 11/28/2011 12:12:39 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[WASP_M0003_TIPO_CREDITO]
AS

BEGIN
	SELECT
		distinct 
		cre.aosuc as suc, 
		cre.aooper as oper , 
		cre.aocta as cta ,   
		tope.Tonom as  TIPCRED

	INTO DBO.TIPO_CREDITO_TEMP

	FROM fsd010 as cre (nolock),
		 fst004 as tope (nolock) 

	WHERE cre.aosbop  = 0 and
		  cre.aooper <> 999999999 and
		  cre.Aomod  = tope.Modulo and
 		  cre.Aotope = tope.totope  and
		  cre.aotasa <> 0 
END
GO

